package com.leo.rocketmqconsumer;

import com.leo.common.constants.RocketMQConstant;
import com.leo.common.request.PraiseRequestDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author Leo
 * @version V1.0
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = RocketMQConstant.TOPIC_PRAISE, consumerGroup = RocketMQConstant.CONSUMER_GROUP_PRAISE)
public class PraiseListener implements RocketMQListener<PraiseRequestDTO> {

    @Override
    public void onMessage(PraiseRequestDTO praiseRequestDTO) {
        log.info("消费者收到点赞数据={}", praiseRequestDTO);
    }
}
